Skip to content

feat: threat intelligence async guards with external API integration#25

Merged
bb-connor merged 4 commits intomainfrom
codex/threat-intel-async-guards
Feb 4, 2026
Merged

feat: threat intelligence async guards with external API integration#25
bb-connor merged 4 commits intomainfrom
codex/threat-intel-async-guards

Conversation

@bb-connor
Copy link
Copy Markdown
Collaborator

Summary

  • Implement async guard runtime with background processing support
  • Add threat intel guards for VirusTotal, Snyk, and Google Safe Browsing APIs
  • Extend policy schema for async guard configuration (caching, rate limiting, retries)
  • Update TypeScript policy validator for new async guard types
  • Add CI workflow updates and comprehensive documentation

Test plan

  • Run async guard runtime tests
  • Test threat intel guard integrations with mock responses
  • Verify policy schema validation for async guard configs
  • Check example policies load and validate correctly

🤖 Generated with Claude Code

Implement asynchronous guard infrastructure for threat intel:
- Async guard runtime with background processing support
- Threat intel guards for VirusTotal, Snyk, and Safe Browsing APIs
- Policy schema extensions for async guards configuration
- TypeScript policy validator updates for new guard types
- CI workflow updates for threat intel testing
- Documentation and example policies

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bb-connor
Copy link
Copy Markdown
Collaborator Author

@codex

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6d6d264e53

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +146 to +150
for (_idx, g) in sequential {
let result = self.evaluate_one(g, action, context).await;
out.push(result);
if out.last().is_some_and(|r| !r.allowed) {
return out;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor fail_fast=false when evaluating async guards

The runtime ignores the fail_fast flag and always short-circuits on the first deny (e.g., the sequential loop returns immediately), which means policies with fail_fast: false will still skip later async guards. Since the engine passes effective_fail_fast() into this method, this behavior makes async guard evaluation inconsistent with the policy setting and can suppress additional denies/warnings or side effects from later guards in the list.

Useful? React with 👍 / 👎.

Comment on lines +363 to +367
Err(_) => fallback(
&name,
&cfg,
AsyncGuardErrorKind::Timeout,
"timeout",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Count async guard timeouts as circuit-breaker failures

Timeouts bypass record_failure(): the Err(_) => fallback(...) branch does not update the circuit breaker, so repeated timeouts will never open the circuit. This defeats the breaker’s purpose for slow/blocked endpoints and can keep the system waiting on every request instead of backing off.

Useful? React with 👍 / 👎.

@bb-connor bb-connor merged commit ec94f6c into main Feb 4, 2026
22 checks passed
@bb-connor bb-connor deleted the codex/threat-intel-async-guards branch March 3, 2026 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant